package com.yjs.app.trade.web.controller.business;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.Order.Direction;
import com.yjs.app.trade.core.util.DESUtils;
import com.yjs.app.trade.core.util.PinYinUtil;
import com.yjs.app.trade.core.util.StringUtils;
import com.yjs.app.trade.entity.base.BusinessConstant;
import com.yjs.app.trade.service.service.business.contract.ContractService;
import com.yjs.app.trade.service.service.business.order.OrderService;
import com.yjs.app.trade.service.service.business.search.NewSearchListService;
import com.yjs.app.trade.service.service.sys.UserService;
import com.yjs.app.trade.service.service.util.bean.ContractInfoVo;
import com.yjs.app.trade.service.service.util.search.SearchConditionUtil;
import com.yjs.app.trade.web.controller.base.BaseController;
import com.yjs.app.trade.web.controller.base.util.Result;
import com.yjs.core.search.order.model.ApparContractSearchModel;
import com.yjs.core.search.order.model.DrugContractSearchModel;
import com.yjs.list.model.ListParamBase;

import net.sf.json.JSONObject;
import net.sf.json.JsonConfig;
import net.sf.json.util.PropertyFilter;

/**
 * 合同相关控制层
 * 
 * @author Administrator
 *
 */
@Controller
@RequestMapping(value = "/app/business/contract")
public class ContractController extends BaseController {

	@Autowired
	NewSearchListService newSearchListService;

	@Autowired
	ContractService contractService;

	@Autowired
	OrderService orderService;
	
	@Autowired
	UserService userService;

	public static JsonConfig buyerContractConfig = new JsonConfig();

	public static JsonConfig sellerContractConfig = new JsonConfig();

	public static JsonConfig dispatcherContractConfig = new JsonConfig();

	static {
		PropertyFilter buyerFilter = new PropertyFilter() {
			@Override
			public boolean apply(Object object, String fieldName, Object fieldValue) {
				if (fieldName.equals("salePrice")) {
					return false;
				} else if (fieldName.equals("transactionPrice")) {
					return false;
				} else if (fieldName.equals("packingSpecification")) {
					return false;
				} else if (fieldName.equals("productTypeCode")) {
					return false;
				} else if (fieldName.equals("modifyed")) {
					return false;
				} else if (fieldName.equals("tradeName")) {
					return false;
				} else if (fieldName.equals("drugCode")) {
					return false;
				} else if (fieldName.equals("priceUnit")) {
					return false;
				} else if (fieldName.equals("dosageformName")) {
					return false;
				} else if (fieldName.equals("drugPackage")) {
					return false;
				} else if (fieldName.equals("specificationName")) {
					return false;
				} else if (fieldName.equals("companyName")) {
					return false;
				} else if (fieldName.equals("purchaseQuantity")) {
					return false;
				} else if (fieldName.equals("isCombo")) {
					return false;
				} else if (fieldName.equals("sellerMemberName")) {
					return false;
				} else if (fieldName.equals("data")) {
					return false;
				} else if (fieldName.equals("productName")) {
					return false;
				} else if (fieldName.equals("page")) {
					return false;
				} else if (fieldName.equals("contractId")) {
					return false;
				} else if (fieldName.equals("modles")) {
					return false;
				} else if (fieldName.equals("body")) {
					return false;
				} else if (fieldName.equals("isTwo")) {
					return false;
				} else {
					return true;
				}
			}
		};
		buyerContractConfig.setJsonPropertyFilter(buyerFilter);

		PropertyFilter sellerFilter = new PropertyFilter() {
			@Override
			public boolean apply(Object object, String fieldName, Object fieldValue) {
				if (fieldName.equals("salePrice")) {
					return false;
				} else if (fieldName.equals("modifyed")) {
					return false;
				} else if (fieldName.equals("transactionPrice")) {
					return false;
				} else if (fieldName.equals("tradeName")) {
					return false;
				} else if (fieldName.equals("drugCode")) {
					return false;
				} else if (fieldName.equals("productCode")) {
					return false;
				} else if (fieldName.equals("priceUnit")) {
					return false;
				} else if (fieldName.equals("dosageformName")) {
					return false;
				} else if (fieldName.equals("drugPackage")) {
					return false;
				} else if (fieldName.equals("specificationName")) {
					return false;
				} else if (fieldName.equals("companyName")) {
					return false;
				} else if (fieldName.equals("sellerMemberName")) {
					return false;
				} else if (fieldName.equals("purchaseQuantity")) {
					return false;
				} else if (fieldName.equals("isCombo")) {
					return false;
				} else if (fieldName.equals("sellerMemberName")) {
					return false;
				} else if (fieldName.equals("data")) {
					return false;
				} else if (fieldName.equals("page")) {
					return false;
				} else if (fieldName.equals("buyerManagerContract")) {
					return false;
				} else if (fieldName.equals("effectiveDate")) {
					return false;
				} else if (fieldName.equals("buyerMemberName")) {
					return false;
				} else if (fieldName.equals("dispatcherMemberName")) {
					return false;
				} else if (fieldName.equals("listedTypeName")) {
					return false;
				} else if (fieldName.equals("statusCode")) {
					return false;
				} else if (fieldName.equals("buyerSignDate")) {
					return false;
				} else if (fieldName.equals("dispatcherSignDate")) {
					return false;
				} else if (fieldName.equals("sellerSignDate")) {
					return false;
				} else if (fieldName.equals("contractId")) {
					return false;
				} else if (fieldName.equals("productName")) {
					return false;
				} else if (fieldName.equals("packingSpecification")) {
					return false;
				} else if (fieldName.equals("body")) {
					return false;
				} else if (fieldName.equals("modles")) {
					return false;
				} else if (fieldName.equals("isTwo")) {
					return false;
				} else if (fieldName.equals("productTypeCode")) {
					return false;
				} else {
					return true;
				}
			}
		};
		sellerContractConfig.setJsonPropertyFilter(sellerFilter);

		PropertyFilter dispatcherFilter = new PropertyFilter() {
			@Override
			public boolean apply(Object object, String fieldName, Object fieldValue) {
				if (fieldName.equals("salePrice")) {
					return false;
				} else if (fieldName.equals("transactionPrice")) {
					return false;
				} else if (fieldName.equals("packingSpecification")) {
					return false;
				} else if (fieldName.equals("productTypeCode")) {
					return false;
				} else if (fieldName.equals("modifyed")) {
					return false;
				} else if (fieldName.equals("tradeName")) {
					return false;
				} else if (fieldName.equals("drugCode")) {
					return false;
				} else if (fieldName.equals("priceUnit")) {
					return false;
				} else if (fieldName.equals("dosageformName")) {
					return false;
				} else if (fieldName.equals("drugPackage")) {
					return false;
				} else if (fieldName.equals("specificationName")) {
					return false;
				} else if (fieldName.equals("companyName")) {
					return false;
				} else if (fieldName.equals("purchaseQuantity")) {
					return false;
				} else if (fieldName.equals("isCombo")) {
					return false;
				} else if (fieldName.equals("buyerMemberName")) {
					return false;
				} else if (fieldName.equals("buyerMemberId")) {
					return false;
				} else if (fieldName.equals("data")) {
					return false;
				} else if (fieldName.equals("productName")) {
					return false;
				} else if (fieldName.equals("page")) {
					return false;
				} else if (fieldName.equals("contractId")) {
					return false;
				} else if (fieldName.equals("modles")) {
					return false;
				} else if (fieldName.equals("body")) {
					return false;
				} else if (fieldName.equals("isTwo")) {
					return false;
				} else if (fieldName.equals("contractType")) {
					return false;
				} else if (fieldName.equals("sellerMemberId")) {
					return false;
				} else if (fieldName.equals("sellerMemberName")) {
					return false;
				} else if (fieldName.equals("modespec")) {
					return false;
				} else if (fieldName.equals("createds")) {
					return false;
				} else if (fieldName.equals("packaging")) {
					return false;
				} else if (fieldName.equals("contractInformationId")) {
					return false;
				} else if (fieldName.equals("contractSearchModel")) {
					return false;
				} else if (fieldName.equals("totalRecord")) {
					return false;
				} else if (fieldName.equals("effectiveDate")) {
					return false;
				} else if (fieldName.equals("statusCode")) {
					return false;
				} else if (fieldName.equals("statusName")) {
					return false;
				} else if (fieldName.equals("productStatusName")) {
					return false;
				} else if (fieldName.equals("productEnterpriseCode")) {
					return false;
				} else if (fieldName.equals("productTypeName")) {
					return false;
				} else if (fieldName.equals("specifications")) {
					return false;
				} else if (fieldName.equals("apparContractSearchModel")) {
					return false;
				} else {
					return true;
				}
			}
		};
		dispatcherContractConfig.setJsonPropertyFilter(dispatcherFilter);
	}

	/**
	 * 根据自己的memberId查询合同信息
	 * 
	 * @param data
	 * @param request
	 * @return
	 */
	@SuppressWarnings("unchecked")
	@RequestMapping(value = "/getBuyerContractList", method = RequestMethod.GET)
	@ResponseBody
	public Object getBuyerContractList(String data, HttpServletRequest request) {
		JSONObject jsonObject = dpackData(data);
		String memberId = getUserMemberId(request);
		int memberType = getUserMemberType(request);
		int pageNo = jsonObject.get("pageNo") != null ? jsonObject.getInt("pageNo") : 1;
		int pageSize = jsonObject.get("pageSize") != null ? jsonObject.getInt("pageSize") : 10;
		List<ListParamBase> listParamBases = new ArrayList<ListParamBase>();
		List<Order> orders = new ArrayList<>();
		if (StringUtils.strIsNotNull(jsonObject.get("buyerMemberName"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("BUYER_MEMBER_NAME",
					jsonObject.getString("buyerMemberName"), "String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("sellerMemberName"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("SELLER_MEMBER_NAME",
					jsonObject.getString("sellerMemberName"), "String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("dispatcherMemberName"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("DISPATCHER_MEMBER_NAME",
					jsonObject.getString("dispatcherMemberName"), "String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("dosageformName"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("DOSAGEFORM_NAME",
					jsonObject.getString("dosageformName"), "String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("drugPackage"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("DRUG_PACKAGE",
					jsonObject.getString("drugPackage"), "String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("specificationName"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("SPECIFICATION_NAME",
					jsonObject.getString("specificationName"), "String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("companyName"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("COMPANY_NAME",
					jsonObject.getString("companyName"), "String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("drugCode"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("DRUG_CODE", jsonObject.getString("drugCode"),
					"String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("contractId"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("CONTRACT_ID", jsonObject.getString("contractId"),
					"String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("isCombo"))) {
			listParamBases.add(
					SearchConditionUtil.getParamBaseValue("IS_COMBO", jsonObject.getString("isCombo"), "String", "eq"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("productCode"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("PRODUCT_CODE",
					jsonObject.getString("productCode"), "String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("statusCode"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("STATUS_CODE", jsonObject.getString("statusCode"),
					"String", "eq"));
		} else {
			if (getUserMemberType(request) == BusinessConstant.MemberType.BUYERMEMBER) {
				listParamBases.add(SearchConditionUtil.getParamBaseValue("STATUS_CODE",
						BusinessConstant.ContractStatus.VALID + "," + BusinessConstant.ContractStatus.CONTINUE,
						"String", "or"));
			}
		}
		if (StringUtils.strIsNotNull(jsonObject.get("beginDt")) || StringUtils.strIsNotNull(jsonObject.get("endDt"))) {
			Map<String, String> dateMap = getBetweenDate(jsonObject.get("beginDt"), jsonObject.get("endDt"));
			ListParamBase paramBase = new ListParamBase();
			paramBase.setFieldName("modifyed");// 搜索字段名
			paramBase.setValue1(dateMap.get("beginDt"));// 搜索值
			paramBase.setValue2(dateMap.get("endDt"));
			paramBase.setFieldTypeId("date");
			paramBase.setEnumSearchType("between");
			listParamBases.add(paramBase);
		}
		if (StringUtils.strIsNotNull(jsonObject.get("productName"))) {
			ListParamBase paramBase = new ListParamBase();
			paramBase.setIsTotal((short)1);
			paramBase.setFieldName("PRODUCT_NAME");
			paramBase.setValue1(jsonObject.getString("productName"));
			if (!StringUtils.isAllChinese(jsonObject.getString("productName"))) {
				paramBase.setIsAutocomplete((short)1);
			}
			paramBase.setFieldTypeId("String");
			paramBase.setEnumSearchType("like");
			listParamBases.add(paramBase);
		}
		if (jsonObject.get("modeType") != null && jsonObject.getInt("modeType") == 2) {
			if (jsonObject.get("orderBy") != null) {
				Order order = Order.create("salePrice", jsonObject.get("orderBy").toString());
				orders.add(order);
			} else {
				Order productNameOrder = Order.create("productName", Direction.ASC.toString());
				orders.add(productNameOrder);
				Order dosageformNameOrder = Order.create("dosageformName", Direction.ASC.toString());
				orders.add(dosageformNameOrder);
				Order specificationNameOrder = Order.create("specificationName", Direction.ASC.toString());
				orders.add(specificationNameOrder);
				Order companyNameOrder = Order.create("companyName", Direction.ASC.toString());
				orders.add(companyNameOrder);
				Order salePriceOrder = Order.create("salePrice", Direction.ASC.toString());
				orders.add(salePriceOrder);
			}
		} else {
			Order order = Order.create("created", Order.Direction.DESC.toString());
			orders.add(order);
		}
		Map<String, Object> map = newSearchListService.listSearchIndexs(SearchConditionUtil.searchMap(
				(jsonObject.get("contractType") != null ? jsonObject.getString("contractType")
						: BusinessConstant.Number.DRAGCONTRACT),
				memberId, memberType, listParamBases, pageNo, pageSize, orders));
		List<DrugContractSearchModel> contractSearchModels = (List<DrugContractSearchModel>) map.get("data");
		int totalNum = Integer.parseInt(map.get("page").toString());
		List<String> contractIds = new ArrayList<>();
		List<String> drugCodes = new ArrayList<>();
		for (DrugContractSearchModel contractSearchModel : contractSearchModels) {
			contractIds.add(contractSearchModel.getDispatcherMemberId());
			drugCodes.add(contractSearchModel.getDrugCode());
		}
		List<Map<String, Object>> listMap = new ArrayList<>();
		if (contractIds != null && contractIds.size() > 0 && drugCodes != null && drugCodes.size() > 0) {
			listMap = orderService.findShareNumberByDispatchIdAndDrugCode(contractIds, drugCodes);
		}
		boolean flag = false;
		for (DrugContractSearchModel contractSearchModel : contractSearchModels) {
			flag = false;
			if (listMap != null && listMap.size() > 0) {
				for (Map<String, Object> maps : listMap) {
					if (StringUtils.equals(contractSearchModel.getDispatcherMemberId(),
							maps.get("dispatchId").toString())
							&& StringUtils.equals(contractSearchModel.getDrugCode(), maps.get("drugCode").toString())) {
						flag = true;
						contractSearchModel.setPurchaseQuantity(Long.parseLong(maps.get("shareNumber").toString()));
					}
				}
			}
			if (!flag) {
				contractSearchModel.setPurchaseQuantity(0l);
			}
		}
		map.clear();
		map.put("data", contractSearchModels);
		map.put("page", totalNum);
		logger.debug(
				JSONObject
						.fromObject(Result.success(JSONObject.fromObject(
								JSONObject.fromObject(map, BaseController.jsonConfig), buyerContractConfig)))
						.toString());
		return DESUtils
				.getEncryptStr(JSONObject
						.fromObject(Result.success(JSONObject.fromObject(
								JSONObject.fromObject(map, BaseController.jsonConfig), buyerContractConfig)))
						.toString(), BaseController.desKey);

	}

	/**
	 * 根据自己的memberId查询合同信息
	 * 
	 * @param data
	 * @param request
	 * @return
	 */
	@RequestMapping(value = "/getSellerContractList", method = RequestMethod.GET)
	@ResponseBody
	public Object getSellerContractList(String data, HttpServletRequest request) {
		JSONObject jsonObject = dpackData(data);
		String memberId = getUserMemberId(request);
		int memberType = getUserMemberType(request);
		int pageNo = jsonObject.get("pageNo") != null ? jsonObject.getInt("pageNo") : 1;
		int pageSize = jsonObject.get("pageSize") != null ? jsonObject.getInt("pageSize") : 10;
		List<ListParamBase> listParamBases = new ArrayList<ListParamBase>();
		List<Order> orders = new ArrayList<>();
		if (StringUtils.strIsNotNull(jsonObject.get("buyerMemberName"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("BUYER_MEMBER_NAME",
					jsonObject.getString("buyerMemberName"), "String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("dispatcherMemberName"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("DISPATCHER_MEMBER_NAME",
					jsonObject.getString("dispatcherMemberName"), "String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("dispatcherMemberName"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("DISPATCHER_MEMBER_NAME",
					jsonObject.getString("dispatcherMemberName"), "String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("drugCode"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("DRUG_CODE", jsonObject.getString("drugCode"),
					"String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("contractId"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("CONTRACT_ID", jsonObject.getString("contractId"),
					"String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("isCombo"))) {
			listParamBases.add(
					SearchConditionUtil.getParamBaseValue("IS_COMBO", jsonObject.getString("isCombo"), "String", "eq"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("statusCode"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("STATUS_CODE", jsonObject.getString("statusCode"),
					"String", "eq"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("productCode"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("PRODUCT_CODE",
					jsonObject.getString("productCode"), "String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("companyName"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("COMPANY_NAME",
					jsonObject.getString("companyName"), "String", "like"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("beginDt")) || StringUtils.strIsNotNull(jsonObject.get("endDt"))) {
			Map<String, String> dateMap = getBetweenDate(jsonObject.get("beginDt"), jsonObject.get("endDt"));
			ListParamBase paramBase = new ListParamBase();
			paramBase.setFieldName("modifyed");// 搜索字段名
			paramBase.setValue1(dateMap.get("beginDt"));// 搜索值
			paramBase.setValue2(dateMap.get("endDt"));
			paramBase.setFieldTypeId("date");
			paramBase.setEnumSearchType("between");
			listParamBases.add(paramBase);
		}
		if (StringUtils.strIsNotNull(jsonObject.get("productName"))) {
			ListParamBase paramBase = new ListParamBase();
			paramBase.setIsTotal((short)1);
			paramBase.setFieldName("TRADE_NAME");
			paramBase.setValue1(jsonObject.getString("productName"));
			if (!StringUtils.isAllChinese(jsonObject.getString("productName"))) {
				paramBase.setIsAutocomplete((short)1);
			}
			paramBase.setFieldTypeId("String");
			paramBase.setEnumSearchType("like");
			listParamBases.add(paramBase);
		}
		if (jsonObject.get("orderBy") != null) {
			Order order = Order.create("created", jsonObject.get("orderBy").toString());
			orders.add(order);
		} else {
			Order productNameOrder = Order.create("productName", Direction.ASC.toString());
			orders.add(productNameOrder);
			Order dosageformNameOrder = Order.create("dosageformName", Direction.ASC.toString());
			orders.add(dosageformNameOrder);
			Order specificationNameOrder = Order.create("specificationName", Direction.ASC.toString());
			orders.add(specificationNameOrder);
			Order companyNameOrder = Order.create("companyName", Direction.ASC.toString());
			orders.add(companyNameOrder);
			Order salePriceOrder = Order.create("salePrice", Direction.ASC.toString());
			orders.add(salePriceOrder);
		}
		logger.debug(JSONObject
				.fromObject(Result.success(JSONObject.fromObject(
						JSONObject.fromObject(newSearchListService.listSearchIndexs(SearchConditionUtil.searchMap(
								(jsonObject.get("contractType") != null ? jsonObject.getString("contractType")
										: BusinessConstant.Number.DRAGCONTRACT),
								memberId, memberType, listParamBases, pageNo, pageSize, orders)),
								BaseController.jsonConfig),
						sellerContractConfig)))
				.toString());
		return DESUtils.getEncryptStr(JSONObject
				.fromObject(Result.success(JSONObject.fromObject(
						JSONObject.fromObject(newSearchListService.listSearchIndexs(SearchConditionUtil.searchMap(
								(jsonObject.get("contractType") != null ? jsonObject.getString("contractType")
										: BusinessConstant.Number.DRAGCONTRACT),
								memberId, memberType, listParamBases, pageNo, pageSize, orders)),
								BaseController.jsonConfig),
						sellerContractConfig)))
				.toString(), BaseController.desKey);
	}

	/**
	 * 查询合同详情
	 * 
	 * @param data
	 * @param request
	 * @return
	 */
	@RequestMapping(value = "/findContractInfoById", method = RequestMethod.GET)
	@ResponseBody
	public Object findContractInfoById(String data, HttpServletRequest request) {
		JSONObject jsonObject = dpackData(data);
		int type = jsonObject.getInt("contractType");
		if (type == 1) {
			return Result.csuccess(contractService.findContractInfoById(jsonObject.getString("contractId")));
		} else if (type == 2) {
			return Result.csuccess(contractService.findContractApparInfoById(jsonObject.getString("contractId")));
		} else {
			return null;
		}
	}

	/**
	 * 根据自己的memberId查询合同信息
	 * 
	 * @param data
	 * @param request
	 * @return
	 */
	@RequestMapping(value = "/getDispatcherContractList", method = RequestMethod.GET)
	@ResponseBody
	@SuppressWarnings("all")
	public Object getDispatcherContractList(String data, HttpServletRequest request) {
		JSONObject jsonObject = dpackData(data);
		String memberId = getUserMemberId(request);
		int memberType = getUserMemberType(request);
		int pageNo = jsonObject.get("pageNo") != null ? jsonObject.getInt("pageNo") : 1;
		int pageSize = jsonObject.get("pageSize") != null ? jsonObject.getInt("pageSize") : 10;
		List<ListParamBase> listParamBases = new ArrayList<ListParamBase>();
		List<Order> orders = new ArrayList<>();

		// 搜索条件
//		Map<String, String> searchMap = new HashMap<String, String>();

//		searchMap.put("memberId", memberId);

		if (StringUtils.strIsNotNull(jsonObject.get("buyerMemberName"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("BUYER_MEMBER_NAME",
					jsonObject.getString("buyerMemberName"), "String", "like"));
//			searchMap.put("buyerMemberName", jsonObject.getString("buyerMemberName"));
		}

		if (StringUtils.strIsNotNull(jsonObject.get("sellerMemberName"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("SELLER_MEMBER_NAME",
					jsonObject.getString("sellerMemberName"), "String", "like"));
//			searchMap.put("sellerMemberName", jsonObject.getString("sellerMemberName"));
		}
		
		if (StringUtils.strIsNotNull(jsonObject.get("dispatcherMemberName"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("DISPATCHER_MEMBER_NAME",
					jsonObject.getString("dispatcherMemberName"), "String", "like"));
//			searchMap.put("sellerMemberName", jsonObject.getString("sellerMemberName"));
		}

		if (StringUtils.strIsNotNull(jsonObject.get("drugCode"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("DRUG_CODE", jsonObject.getString("drugCode"),
					"String", "like"));
//			searchMap.put("drugCode", jsonObject.getString("drugCode"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("contractId"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("CONTRACT_ID", jsonObject.getString("contractId"),
					"String", "like"));
//			searchMap.put("contractId", jsonObject.getString("contractId"));
		}

		if (StringUtils.strIsNotNull(jsonObject.get("statusCode"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("STATUS_CODE", jsonObject.getString("statusCode"),
					"String", "eq"));
//			searchMap.put("statusCode", jsonObject.getString("statusCode"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("productCode"))) {
			listParamBases.add(SearchConditionUtil.getParamBaseValue("PRODUCT_CODE",
					jsonObject.getString("productCode"), "String", "like"));
//			searchMap.put("productCode", jsonObject.getString("productCode"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("isCombo"))) {
			listParamBases.add(
					SearchConditionUtil.getParamBaseValue("IS_COMBO", jsonObject.getString("isCombo"), "String", "eq"));
		}
		if (StringUtils.strIsNotNull(jsonObject.get("beginDt")) || StringUtils.strIsNotNull(jsonObject.get("endDt"))) {
//			searchMap = getBetweenDate(jsonObject.get("beginDt"), jsonObject.get("endDt"));
			Map<String, String> dateMap = getBetweenDate(jsonObject.get("beginDt"), jsonObject.get("endDt"));
			ListParamBase paramBase = new ListParamBase();
			paramBase.setFieldName("modifyed");// 搜索字段名
			paramBase.setValue1(dateMap.get("beginDt"));// 搜索值
			paramBase.setValue2(dateMap.get("endDt"));
			paramBase.setFieldTypeId("date");
			paramBase.setEnumSearchType("between");
			listParamBases.add(paramBase);
		}
		if (StringUtils.strIsNotNull(jsonObject.get("productName"))) {
			ListParamBase paramBase = new ListParamBase();
			if (StringUtils.isAllChinese(jsonObject.getString("productName"))) {
				paramBase.setFieldName("PRODUCT_NAME");
				paramBase.setValue1(jsonObject.getString("productName").toUpperCase());
//				searchMap.put("productName", jsonObject.getString("productName").toLowerCase());
			} else {
				paramBase.setFieldName("PRODUCT_NAME_PY");
				paramBase.setValue1(PinYinUtil.cn2py(jsonObject.getString("productName")).toUpperCase());
//				searchMap.put("productNamePy", PinYinUtil.cn2py(jsonObject.getString("productName")).toUpperCase());
			}
			paramBase.setFieldTypeId("String");
			paramBase.setEnumSearchType("like");
			listParamBases.add(paramBase);
		}
		List<Map<String, Object>> passportsMap = userService.getPassportSalesAut(getUserId(request));
		if (StringUtils.strIsNull(passportsMap.get(0).get("adminPassportId"))) {
			String memberIds = "";
			for (Map<String, Object> map : passportsMap) {
				if (map.get("memberId") != null) {
					if (StringUtils.isBlank(memberIds)) {
						memberIds += map.get("memberId").toString();
					} else {
						memberIds +=  "," + map.get("memberId").toString();
					}
				}
			}
			if (StringUtils.strIsNotNull(memberIds)) {
				listParamBases.add(SearchConditionUtil.getParamBaseValue("BUYER_MEMBER_ID", memberIds,"String", "or"));
			} else {
				Map<String, Object> map = new HashMap<>();
				map.put("data", new ArrayList<>());
				map.put("page", 0);
				return Result.csuccess(map);
			}
		}
		if (jsonObject.get("sort") != null) {
			Order order = Order.create("created", jsonObject.get("sort").toString());
			orders.add(order);
		} else {
			Order productNameOrder = Order.create("productName", Direction.ASC.toString());
			orders.add(productNameOrder);
			Order dosageformNameOrder = Order.create("dosageformName", Direction.ASC.toString());
			orders.add(dosageformNameOrder);
			Order specificationNameOrder = Order.create("specificationName", Direction.ASC.toString());
			orders.add(specificationNameOrder);
			Order companyNameOrder = Order.create("companyName", Direction.ASC.toString());
			orders.add(companyNameOrder);
			Order salePriceOrder = Order.create("salePrice", Direction.ASC.toString());
			orders.add(salePriceOrder);
		}
		
		String contractType = jsonObject.get("contractType") != null ? jsonObject.getString("contractType"): BusinessConstant.Number.DRAGCONTRACT;
		Map<String, Object> map = newSearchListService.listSearchIndexs(SearchConditionUtil.searchMap(contractType, memberId, memberType, listParamBases, pageNo, pageSize, orders));
		List<ContractInfoVo> contractInfoVoList = new ArrayList<ContractInfoVo>();
		int totalNum = Integer.parseInt(map.get("page").toString());
		if (StringUtils.equals(BusinessConstant.Number.DRAGCONTRACT, contractType)) {
			List<DrugContractSearchModel> contractSearchModelList = (List<DrugContractSearchModel>) map.get("data");
			List<String> list = new ArrayList<String>();
			Map<String, List<DrugContractSearchModel>> maps = new HashMap<String, List<DrugContractSearchModel>>();
			if (contractSearchModelList != null && contractSearchModelList.size() != 0) {
				// 把相同的数据保存在map里面
				for (DrugContractSearchModel drugContractSearchModel : contractSearchModelList) {
					if (maps.containsKey(drugContractSearchModel.getContractInformationId())) {
						maps.get(drugContractSearchModel.getContractInformationId()).add(drugContractSearchModel);
					} else {
						List<DrugContractSearchModel> contractSearchModelList1 = new ArrayList<DrugContractSearchModel>();
						contractSearchModelList1.add(drugContractSearchModel);
						maps.put(drugContractSearchModel.getContractInformationId(), contractSearchModelList1);
					}
				}

				// 去掉list中重复的数据
				for (int i = 0; i < contractSearchModelList.size() - 1; i++) {
					for (int j = contractSearchModelList.size() - 1; j > i; j--) {
						if (StringUtils.equals(contractSearchModelList.get(j).getContractInformationId(),
								contractSearchModelList.get(i).getContractInformationId())) {
							contractSearchModelList.remove(j);
						}
					}
				}

				for (DrugContractSearchModel contractSearchModel2 : contractSearchModelList) {
					list.add(contractSearchModel2.getContractInformationId());
					ContractInfoVo contractInfoVo = new ContractInfoVo();
					contractInfoVo.setCreateds(contractSearchModel2.getCreateds());
					contractInfoVo.setContractInformationId(contractSearchModel2.getContractInformationId());
					contractInfoVo.setEffectiveDate(contractSearchModel2.getEffectiveDate());
					contractInfoVo.setBuyerMemberId(contractSearchModel2.getBuyerMemberId());
					contractInfoVo.setBuyerMemberName(contractSearchModel2.getBuyerMemberName());
					contractInfoVo.setSellerMemberId(contractSearchModel2.getSellerMemberId());
					contractInfoVo.setSellerMemberName(contractSearchModel2.getSellerMemberName());
					contractInfoVo.setStatusName(contractSearchModel2.getStatusName());
					contractInfoVo.setIsTwo(contractSearchModel2.getIsTwo());
					List<DrugContractSearchModel> drugContractSearchModels = maps.get(contractSearchModel2.getContractInformationId());
					contractInfoVo.setContractSearchModel(drugContractSearchModels);
					contractInfoVoList.add(contractInfoVo);
				}

				// 查询每个合同的合同类型
				List<Map<String, Object>> listMap = contractService.findContractTypeByContractId(list);

				for (ContractInfoVo contractInfoVo : contractInfoVoList) {
					for (int i = 0; i < listMap.size(); i++) {
						Map<String, Object> map1 = listMap.get(i);
						if (StringUtils.equals(contractInfoVo.getContractInformationId(),
								map1.get("CONTRACT_INFORMATION_ID").toString())) {
							contractInfoVo.setContractType(map1.get("CONTRACT_TYPE") != null ? map1.get("CONTRACT_TYPE").toString() : "");
						}
					}
				}
			}
			if (jsonObject.get("sort") != null) {
				if (StringUtils.equals(jsonObject.get("sort").toString(), "DESC")) {
					Collections.sort(contractInfoVoList, new Comparator<ContractInfoVo>() {
						@Override
						public int compare(ContractInfoVo o1, ContractInfoVo o2) {
							return o1.getCreateds().compareTo(o2.getCreateds());
						}
					});
					Collections.reverse(contractInfoVoList);
				} else if (StringUtils.equals(jsonObject.get("sort").toString(), "ASC")) {
					// 升序
					Collections.sort(contractInfoVoList, new Comparator<ContractInfoVo>() {
						@Override
						public int compare(ContractInfoVo o1, ContractInfoVo o2) {
							return o1.getCreateds().compareTo(o2.getCreateds());
						}
					});
				}
			}
		} else if (StringUtils.equals(BusinessConstant.Number.APPARCONTRACT, contractType)) {
			List<ApparContractSearchModel> contractSearchModelList = (List<ApparContractSearchModel>) map.get("data");
			List<String> list = new ArrayList<String>();
			Map<String, List<ApparContractSearchModel>> maps = new HashMap<String, List<ApparContractSearchModel>>();
			if (contractSearchModelList != null && contractSearchModelList.size() != 0) {
				// 把相同的数据保存在map里面
				for (ApparContractSearchModel drugContractSearchModel : contractSearchModelList) {
					if (maps.containsKey(drugContractSearchModel.getContractInformationId())) {
						maps.get(drugContractSearchModel.getContractInformationId()).add(drugContractSearchModel);
					} else {
						List<ApparContractSearchModel> contractSearchModelList1 = new ArrayList<ApparContractSearchModel>();
						contractSearchModelList1.add(drugContractSearchModel);
						maps.put(drugContractSearchModel.getContractInformationId(), contractSearchModelList1);
					}
				}

				// 去掉list中重复的数据
				for (int i = 0; i < contractSearchModelList.size() - 1; i++) {
					for (int j = contractSearchModelList.size() - 1; j > i; j--) {
						if (StringUtils.equals(contractSearchModelList.get(j).getContractInformationId(),
								contractSearchModelList.get(i).getContractInformationId())) {
							contractSearchModelList.remove(j);
						}
					}
				}

				for (ApparContractSearchModel contractSearchModel2 : contractSearchModelList) {
					list.add(contractSearchModel2.getContractInformationId());
					ContractInfoVo contractInfoVo = new ContractInfoVo();
					contractInfoVo.setCreateds(contractSearchModel2.getCreateds());
					contractInfoVo.setContractInformationId(contractSearchModel2.getContractInformationId());
					contractInfoVo.setEffectiveDate(contractSearchModel2.getEffectiveDate());
					contractInfoVo.setBuyerMemberId(contractSearchModel2.getBuyerMemberId());
					contractInfoVo.setBuyerMemberName(contractSearchModel2.getBuyerMemberName());
					contractInfoVo.setSellerMemberId(contractSearchModel2.getSellerMemberId());
					contractInfoVo.setSellerMemberName(contractSearchModel2.getSellerMemberName());
					contractInfoVo.setStatusName(contractSearchModel2.getStatusName());
					List<ApparContractSearchModel> drugContractSearchModels = maps.get(contractSearchModel2.getContractInformationId());
					contractInfoVo.setApparContractSearchModel(drugContractSearchModels);
					contractInfoVoList.add(contractInfoVo);
				}

				// 查询每个合同的合同类型
				List<Map<String, Object>> listMap = contractService.findContractTypeByContractId(list);

				for (ContractInfoVo contractInfoVo : contractInfoVoList) {
					for (int i = 0; i < listMap.size(); i++) {
						Map<String, Object> map1 = listMap.get(i);
						if (StringUtils.equals(contractInfoVo.getContractInformationId(),
								map1.get("CONTRACT_INFORMATION_ID").toString())) {
							contractInfoVo.setContractType(map1.get("CONTRACT_TYPE") != null ? map1.get("CONTRACT_TYPE").toString() : "");
						}
					}
				}
			}
			if (jsonObject.get("sort") != null) {
				if (StringUtils.equals(jsonObject.get("sort").toString(), "DESC")) {
					Collections.sort(contractInfoVoList, new Comparator<ContractInfoVo>() {
						@Override
						public int compare(ContractInfoVo o1, ContractInfoVo o2) {
							return o1.getCreateds().compareTo(o2.getCreateds());
						}
					});
					Collections.reverse(contractInfoVoList);
				} else if (StringUtils.equals(jsonObject.get("sort").toString(), "ASC")) {
					// 升序
					Collections.sort(contractInfoVoList, new Comparator<ContractInfoVo>() {
						@Override
						public int compare(ContractInfoVo o1, ContractInfoVo o2) {
							return o1.getCreateds().compareTo(o2.getCreateds());
						}
					});
				}
			}
		}
		map.clear();
		map.put("data", contractInfoVoList);
		map.put("page", totalNum);
		// 查询总记录数
//		map.put("totalRecord", contractService.findContractTotalRecordNum(searchMap));
		logger.debug(
				JSONObject
						.fromObject(Result.success(JSONObject.fromObject(
								JSONObject.fromObject(map, BaseController.jsonConfig), dispatcherContractConfig)))
						.toString());
		return DESUtils
				.getEncryptStr(JSONObject
						.fromObject(Result.success(JSONObject.fromObject(
								JSONObject.fromObject(map, BaseController.jsonConfig), dispatcherContractConfig)))
						.toString(), BaseController.desKey);
	}
	/**
	 * 测试专用
	 * 
	 * @param data
	 * @param request
	 * @return
	 */
	@RequestMapping(value = "/getDispatcherContractListt", method = RequestMethod.GET)
	@ResponseBody
	@SuppressWarnings("all")
	public Object getDispatcherContractListt(String data, HttpServletRequest request) {
		return "0af6668c894691598d6ee21e8d99d1b91c8bbfabea3b54aa179115fa529e80d2e7bdddf8c64aa37d3473d64e211bb7425e35954cb9ebccd397f5d61764427b9910fe3973bacda8bb013baf344f913b49deca5cb16a36a21e62768b07b539df2b0b530aaec2ad5d2dc9e8923fb5d5e0fe2d18cd81f8b51ea6363b25b231976bdb6e550094576d366eb623b315c28e5ab1e0384ab1093c50fe028167d6c30d897f47bc333ebe8fe8d00cb8aa90b4bebb02d4639b63c0b7a2bdbda71fedc490d10950b3093bf6fb85a159a0a3127e393c28306b60f343d39e6b04738376d0b8c7990793b9575be8104b2855e8a5b3eea40a0f6c3c71a70f96b69b7771ad240a8a12ef1c2f15fab8bfb1c72cd98f8c5882c7f3725262610b750adac0d70af3c2a8d3de191d569e0462c1f121645a114e66426481ca9c6229b8d0dd313ce6865e17b2770ba3f9a6b142d7dfebe632e1d8741fca567216843014598895702758cb29a03482821d1c5401417a0ecf872052ebbf07742c5c810922b49cf132fbf1dda6d3b789e1258c70460c22e6ad8161f2e72241722caeb1cf62ab007068f196ac61899404e375157c7bc79b7771ad240a8a12dfabc8e304bc47b9ad5adb14fd98a926c2184e6324a719f895e5e7428d0e7b046c2970500394a53c0baf637c6776798751a66a0fe136100abf972e0689c1f4d779fe9379c0184cecf44fd03c13b0ff0f77d403f654e2ae02f7eb05b07af8f2a84cb541c52f79f32aa7563879ff13d41f559bb5181c4d20295a193c60da0411565f52f95dd53834d7f8c2379c1ce9483765ef47ed429088a0de0674c958d57f3d38e0c98ddaed0d5cf73db4e886c89f595923996103876d498505470c935a7d73f8a6835e0ed598743482821d1c5401417088c2ed5cc1fc70d45be34bab703954c9669650642960af0d6b16a55727667bd5a0e8f64b73186b7ae16eef891699d2d24dbbbfd6c7583f39c71401f3a9fc7310bbfdf8ddce8d53f7f3a5fd10465f2bbd84e272cbe617c20bf36d682327b22861f75a46b5a99d564f58430232524699e4e05c98474297edfc2d71e1c4b2e9a733b82b0988ca5b0a0d417607786d2faf1d81a7eebfd07e684015ed742610aab006f2068ba9932433d3421a9d5eb9f8dba79e23ee994c737eb1377cd5a3afa812784d4b975c7a808cfa0f00b13fd6808b2e29a0a0ce2a8885b2cc1e619c77db1f9499b8d2de4bb539b21816b6faed9f7e048b7a21f52533de6f425d0ea9bfa6a68362fa94be17662504738376d0b8c7998cc79d0cc55353853592c674812b5466cc8a9a780178bcfec4f2b82a71ce1fa66dd45378e6e9007b50b3093bf6fb85a1773e30f0cc9c22439025e318d47ddcce8eaf677acab8bed2d7c9bf8d48f653175da343c7b2e4157029bb3d432f2001f0ccc9fd3f8d39874fd3421a9d5eb9f8db44747ca6c578278fd81207a1b03e5443a61f97992b837dc24b229d65015f7af895e3eace832e1ca7f883b854a0aa636b0bf36d682327b22861f75a46b5a99d564f58430232524699e4e05c98474297ede4a741089310a55133b82b0988ca5b0a0d417607786d2faf1d81a7eebfd07e684015ed742610aab006f2068ba9932433d3421a9d5eb9f8dba79e23ee994c737eb1377cd5a3afa812b74789912c00385f1f283c4386beca20a6136644b043608521f4286e42848544d0022bba42f75d74071ff64ce6c912eb5f3a01e7b1b2a21bb06278b1ba5606070d417607786d2faf344536d31aae1871018a5a11e69e06a9e4e05c98474297ed2de5274ead1c29788c7666697781666a560f3be1c5318c70e73d15f2637a279bd638ed33316b1440a219524c9f4fbc0bff5856952b19341d31f18d13564c1fc78674c60a06fb6220de3f6d560b673a95d50702d7283d4946b22bf73aeea047d96216a14d781a7e014edb4c28d107bbafad5adb14fd98a926c2184e6324a719f895e5e7428d0e7b046c2970500394a53c9b6cfe505191bd2751a66a0fe136100abf972e0689c1f4d779fe9379c0184cecf44fd03c13b0ff0f77d403f654e2ae02f7eb05b07af8f2a84cb541c52f79f32aa7563879ff13d41f0f47d2188c92c1c2dc1af8a41d91d60d30ed0aff67b11d7e407ea64859fe6930e045c84794961deb9d49fcefebd236c2a8e54202e39d5dcbbaf2b5517c5a71e34d1e689d882fbeaecef6b7493690f4ddfa02ad984bec2acfe3f092665d7107d71f60574308872e988c7666697781666a560f3be1c5318c70e73d15f2637a279bd638ed33316b1440a219524c9f4fbc0bff5856952b19341d31f18d13564c1fc78674c60a06fb6220de3f6d560b673a95d50702d7283d4946b22bf73aeea047d96216a14d781a7e014edb4c28d107bbafad5adb14fd98a926c2184e6324a719f895e5e7428d0e7b046c2970500394a53c81ee5b3009f3dd2b93781ca006b91d63bf972e0689c1f4d779fe9379c0184cecf44fd03c13b0ff0f77d403f654e2ae02f7eb05b07af8f2a84cb541c52f79f32aa7563879ff13d41f9d12a1db8690a028dc1af8a41d91d60d30ed0aff67b11d7e4c1d6a11fcef29d9e045c84794961deb7ca154d6abe51d655291688c211487d11aad84b936e535b9b330d3ac62aa8c5e14deb73d4f9a8235566a0ae558fc5576ba23dabc0e41b2efcb42b2bfa6bb34969bbc259640ddc630e3f092665d7107d7c48b6580ee9c4d3cb75572e289c736c439093f7b7aaa1a719b8674e825f09ba1d484bb57eb70203721f6f0369f4da79a4bed79b71fe1fb4290eb2cbd2b9a525aa90dc6a2707cb58dc4d1267802c1bc7c1093bdc67bde6ed9bf5ba769cbd0eec86e364011ab95b5f3e8aa38ec9693004a0fa712ca4604f5946bd3ac5adece0df61583d7edc416023340a8945314281ec8bc562389cf5407fdef3fa059971b73a970997bfd69d21e5bc5c10b0c8c75a9e09a3fe2d51d4378dcd21548bf055acbfb45785eb2faa8cc358ccf081fe3be5d285f52f95dd53834d7256872ed088052c565ef47ed429088a05533d05a8ddcc86738e0c98ddaed0d5cf73db4e886c89f595923996103876d498505470c935a7d734e72ffa732f8407f3c64f708d12d19c67248894e1eef0e89d6666cb6ded58e08636e67d1302b66c5d24dbbbfd6c7583f39c71401f3a9fc7310bbfdf8ddce8d53f7f3a5fd10465f2bbd84e272cbe617c2490c6bf707a56a016e24ba3b835f43f86a51f09326fbc51c7e6a338ff5bd944ed5e951e7d648a05fa73a3c1167211752c9710eb69fbf6a9a5a24c176b1569e0551c562b68633302b9a1e070a0da155b159733ef3ca44df722ed72906e37ac30534d6b23f03ede50cbc57613f397cb1b6d1e443eff7a22e56860bbd991c413a4a33ef42337d71a6e99490d896885ccabd03d47668f3181a5a771ed73c59ecea6b21512af49eb05b08b8c880b76c106d99763ff9e6c17fcbf26f425d0ea9bfa6a68362fa94be176625de0cd02ccbcc30436d32006f22b7cdc7d0f619e4af9c2462b04c357b73f3cd8f8ee6c93e1491fba183daa761feb96a0e586af86b44bab7ee6d2c378ea61aab2a9cf132fbf1dda6d3b789e1258c70460c22e6ad8161f2e72241722caeb1cf62ab007068f196ac61899404e375157c7bc79b7771ad240a8a12dfabc8e304bc47b9ef1c2f15fab8bfb11e8f316fca9285bff53755e6fdbd61616a06b76f160e1f823652f256d6f9906186a0734174942d8ad4639b63c0b7a2bdbda71fedc490d10950b3093bf6fb85a1b84ba65af4b58b5e306b60f343d39e6b04738376d0b8c7990793b9575be8104b2855e8a5b3eea40a0f6c3c71a70f96b69b7771ad240a8a12ef1c2f15fab8bfb138d0692de93aad716a4fa92837def02ab621b067e7fc4a3022f7bfbc1e80826fb563ed62e3dc02fecd511aa950570118b25d868d2ef7eba47c7e8cab905964845798ddc9890d377253f068d73094ebf612a8b6cc59a354f044fdd5c5dcd5032fc12012db4ce66d033c9c77888a96ace6b75572e289c736c439093f7b7aaa1a713d0ed1c7f13e0f9f5e8621e9bb46f6a3663002551d544fd91de38ee9a22c6dd6281613bf7310592b53008ac9efb5d1ff3b2116d1ed803099a750a900c2b3856a5703648cce149e3c9912626060f34816c4c3e38941f219d44b5b5df56b3cf5c3421927f6db4eb34467575a075a3564d6194bec52861f2659586af86b44bab7eebfd787a935d9101296516e6ded94b94e3db5126b6a233a2664852acfd92a2b1cc004f8578e9c248e73c6246f1030cd601cdca43bf1d6a47e490c6bf707a56a01790663c135866e9d6ba28fd48513c62e2e29a0a0ce2a8885a79786bf3f495a279499b8d2de4bb5399c344b4c404a2449ca2cb70cde8e214b6f425d0ea9bfa6a68362fa94be176625de0cd02ccbcc3043bdbe35336ce90b3b646ae84a31703f9b77eb7ea2cca570bc3dbacdb4e375e5eb3482821d1c540141fc1dcc79004e1792d1d4d6c1299dd3aacbf1d45f2d6d838bdfabb4b31cb08b336e0e858e79d4769e663002551d544fd91de38ee9a22c6dd6281613bf7310592b53008ac9efb5d1ff3b2116d1ed803099a750a900c2b3856a5703648cce149e3c9912626060f3481615d529c80d24c5c6fa88328993bcf60640be3930d084b42689df7da698367570b9920bdddb723346175a45b083cae222b003ed4a2d90c60833bfca62785403af101d43550d495eda52d7831c97590ba0e4b6ec14e64c578e8aa325997cc874a227ca6cd42a16100d7cb3f38ded801ad5ad7fac3ef64cc8562f52c22acf9f743ca9057a62cc3d01a491ed1f8161611808d274cca4cb169c346567bfbe9a00ea2b";
	}

}
